﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ModelClassesLinqToSql.Views.Movie;
using ModelClassesLinqToSql.Domain.Models;

namespace ModelClassesLinqToSql.Domain.Repositories
{
    public class ProductionCompanyRepository : IProductionCompanyRepository
    {
        private PrototypeDataContext dataContext;

        public ProductionCompanyRepository()
        {
            this.dataContext = new PrototypeDataContext();
        }

        public IQueryable<ProductionCompany> GetAll()
        {

            return (from u in this.dataContext.ProductionCompanies
                    orderby u.Name
                    select u);
        }
    }
}